package com.itlong.cloud.project.operate;

import com.itlong.cloud.POJO.DTO.operate.OperateAppTypeDTO;
import com.itlong.cloud.POJO.DTO.operate.OperateAppTypeGetPageDTO;
import com.itlong.cloud.POJO.PO.InterfacePO;
import com.itlong.cloud.POJO.VO.operate.InterfaceVO;
import com.itlong.cloud.POJO.VO.operate.OperateAppTypeVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;

/**
 * <desc>
 *    应用类型业务处理暴露接口
 * </desc>
 *
 * @createDate 2021-08-04
 */
@FeignClient(name = "project-service")
public interface IOperateAppTypeServiceClient {


    /**
    * <desc>
    *      查询、获取分页列表
    * </desc>
    * @param appTypeGetPageDto
    * @return: com.itlong.cloud.utils.page.Page<com.itlong.cloud.POJO.VO.operate.OperateAppTypeVO>
    * @author LiuYu
    * @date: 2021-08-16
     **/
    @RequestMapping(path = "/operate/appType/getAppTypeList",method = RequestMethod.POST)
    Page<OperateAppTypeVO> getAppTypeList(@RequestBody OperateAppTypeGetPageDTO appTypeGetPageDto);

    /**
    * <desc>
    *      添加应用类型
    * </desc>
    * @param operateAppTypeDTO
    * @return: java.lang.Integer
    * @author LiuYu
    * @date: 2021-08-16
     **/
    @RequestMapping(path = "/operate/appType/save",method = RequestMethod.POST)
    Integer save(@RequestBody OperateAppTypeDTO operateAppTypeDTO) throws Exception;

    /**
    * <desc>
    *     修改应用类型
    * </desc>
    * @param operateAppTypeDTO
    * @return: java.lang.Integer
    * @author LiuYu
    * @date: 2021-08-16
     **/
    @RequestMapping(path = "/operate/appType/update",method = RequestMethod.POST)
    Integer update(@RequestBody OperateAppTypeDTO operateAppTypeDTO) throws Exception;

    /**
    * <desc>
    *      删除应用类型
    * </desc>
    * @param ids
    * @return: java.lang.Integer
    * @author LiuYu
    * @date: 2021-08-16
     **/
    @RequestMapping(path = "/operate/appType/delete",method = RequestMethod.POST)
    Integer delete(@RequestParam("ids") String ids);

    /**
    * <desc>
    *      获取分配接口类型
    * </desc>
    * @param appTypeId
    * @return: java.util.List<com.itlong.cloud.POJO.VO.operate.InterfaceVO>
    * @author LiuYu
    * @date: 2021-08-16
     **/
    @RequestMapping(path = "/operate/appType/getAllotInterfaces",method = RequestMethod.POST)
    List<InterfaceVO> getAllotInterfaces(@RequestParam("appTypeId") String appTypeId);

    /**
    * <desc>
    *      分配接口类型提交
    * </desc>
    * @param appTypeId
    * @param ids
    * @return: java.lang.Integer
    * @author LiuYu
    * @date: 2021-08-16
     **/
    @RequestMapping(path = "/operate/appType/commitAllotInterfaces",method = RequestMethod.POST)
    Integer commitAllotInterfaces(@RequestParam("appTypeId") String appTypeId,@RequestParam("ids") String ids);
}
